<h1>Listing cells</h1>

<table>
  <tr>
  <% for column in Cell.content_columns %>
    <th><%= column.human_name %></th>
  <% end %>
  </tr>
  
<% for cell in @cells %>
  <tr>
  <% for column in Cell.content_columns %>
    <td><%=h cell.send(column.name) %></td>
  <% end %>
    <td><%= link_to 'Download', download_cell_path(cell) %></td>
    <td><%= link_to 'Destroy', cell_path(cell), 
              :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<%= link_to('Previous page', :page => @cell_pages.current.previous) if @cell_pages.current.previous %>
<%= link_to('Next page', :page => @cell_pages.current.next) if @cell_pages.current.next %> 

<br />
<%= link_to 'New cell', new_cell_path %>